<header id="topbar" class="affix">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="<%= window.location.href %>">晒单详情</a>
            </li>
            <li class="crumb-link">
                <a href="#op/show/">晒单管理</a>
            </li>
            <li class="crumb-trail"><%= info.status >= 2 ? "晒单审核" : "新增晒单" %></li>
        </ol>
    </div>
    <div class="pull-right">
        <a href="javascript:;" class="btn btn-primary btn-sm light fw600 ml10" id='showSave'><span class="fa fa-save"></span>保存</a>
    </div>
</header>
<section id="content">
    <div class="panel">
        <form id="show-form" class="form-horizontal" role="form">
                <% var order_detail = JSON.parse(info.detail); %>
                <div class="form-group">
                    <label class="col-md-1 control-label">彩种／玩法／期数</label>
                    <p class="form-control-static text-muted">
                         <%= LOTTERY_TYPE[info.activity_type] %> / <%= BET_TYPE[info.activity_type][order_detail.bet_type] %> /  <%= info.term_number %>
                    </p>
                </div>
            <br>
                <div class="form-group">
                    <label for="cal-md-1 control-label">中奖详情</label>
                    <p class="form-control-static text-muted">
                        订单购买时间: <%= order_detail['created_at']  %>
                        获奖金额: <%= order_detail['win_price'] %>
                        加奖: <%= order_detail['bonus'] %>
                        购买号码: <%= order_detail['number'] %>
                        下注倍数： <%= order_detail['times'] %>
                        下注单位: <%= order_detail['unit'] %>
                        下注金额: <%= order_detail['price'] %>
                    </p>
                </div>



                <div class="form-group">
                    <label class="col-md-1 control-label">中奖者ID:</label>
                    <div class="col-md-4">
                        <p class="form-control-static text-muted">
                            <a href="#stats/account/?id=<%= info.user_id %>"><%= info.user_id %></a>
                        </p>
                    </div>
                </div>
            <% if(info.status < 2 ){ %>
            <div class="form-group">
                <label class="col-md-1 control-label">用户头像:</label>
                <div class="col-md-1" id="container">
                    <img id="avatar" width="100%" src="<%= account.avatar_id %>" alt="头像" >
                    <button id="uploadAvatar" class="form-control" data-img="avatar">更换头像</button>
                </div>
            </div>
            <% } %>
            <div class="form-group">
                <label class="col-md-1 control-label">晒单内容:</label>
                <div class="col-md-9">
                    <textarea name="content" rows="3" class="form-control" id="inputContent" readonly><%= info.content %></textarea>
                    <div class="row">
                        <% var imageList = info.images.split(',');
                            _.each(imageList, function(url){
                                if(!url)return; %>
                                <div class="col-lg-3 col-md-4 col-xs-6 thumb">
                                    <% if(info.status <= 2){ %>
                                        <a class="close delete-image" href="#">x</a>
                                    <% } %>
                                    <a class="thumbnail image-popup" href=<%= url %>>
                                    <img class="detail-image" src=<%= url %>>
                                </a>
                                </div>
                            <% }) %>
                    </div>
                </div>
            </div>
        <% if(info.status >= 2){ %>
            <div class="form-group">
                <label class="col-md-1 control-label">晒单状态：</label>
                <div class="col-md-3">
                    <select id="inputStatus" class="form-control">
                        <%  _.each(window.SHOW_STATUS, function(value, key){  %>
                        <option value="<%= key %>" <%= info.status == key ? 'selected' : '' %> > <%= value %> </option>
                       <% }); %>
                    </select>
                </div>
                <div class="col-md-3">
                    <label class="checkbox-inline">
                        <input type="checkbox" id="inputHighlight" <%= info.highlight? "checked" : "" %>>
                    设为精华贴</label>
                </div>
            </div>
            <div class="form-group">
                <label for="inputComment" class="col-md-1 control-label">审核意见:</label>
                <div class="col-md-9">
                    <textarea name="comment" id="inputComment" rows="2" placeholder="可不填" class="form-control"><%= info.verify_comment %></textarea>
                </div>
            </div>
        <% } %>
        </form>
    </div>

</section>
